package com.example.guiguiapplicatio.fragment.record;

import android.os.Bundle;

import androidx.fragment.app.Fragment;
import androidx.navigation.Navigation;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.example.guiguiapplicatio.R;
import com.example.guiguiapplicatio.fragment.examination.ExaminationRecordFragment;
import com.google.android.material.bottomnavigation.BottomNavigationView;

public class RecordSucessFragment extends Fragment {

    private Button backHome;
    private Button gotoSigning;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_record_success, container, false);
        backHome=view.findViewById(R.id.back_home);
        gotoSigning=view.findViewById(R.id.goto_signing);
        backHome.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Navigation.findNavController(v).navigate(R.id.action_recordSuccessFragment_to_navigation_home);
            }
        });
        gotoSigning.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Navigation.findNavController(v).navigate(R.id.action_recordSuccessFragment_to_newFileFragment);
            }
        });

        return view;
    }
    @Override
    public void onResume() {
        BottomNavigationView bottomNavigationView=requireActivity().findViewById(R.id.nav_view);
        bottomNavigationView.setVisibility(View.INVISIBLE);
        //这两行代码设置隐藏底部导航栏，若要显示啧修改INVISIBLE为Visible（可见）
        super.onResume();
    }
}